<?php
// jimport('infinity.virturemart');
class VirturemartModel {
    public function __construct(){
        if (!class_exists( 'VmConfig' )) require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'config.php');
        VmConfig::loadConfig();
    }

    public function getChildCategoryList($category_id, $vendorId=1){
        $cache = JFactory::getCache('com_virtuemart','callback');
        return $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category_id );
    }

    public function getCategoryRecurse($category_id, $parent_category_id=0) {
        $categoryModel = VmModel::getModel('Category');
        return $categoryModel->getCategoryRecurse($category_id, $parent_category_id);
    }
}